#coding:utf-8
# @Time    : 2018/9/30 4:45
# @Author  : 0x007er
# @File    : helper.py
# @Software: PyCharm
import os
def shell_exec(commands):
    try:
        res = os.popen(commands)
        return res.read()
    except Exception as e:
        print(e)
        return False
def wc(filename):
    try:
        res = shell_exec('wc -l '+filename)
        return  int(res.split(' ')[0])
    except Exception as e:
        print(e)
        return False